## `summarise()` has grouped output by 'date'. You can override using the
## `.groups` argument.
# Shortwave
sw_daily<- ggplot(all_rad_daily) +
  geom_line(aes(x = date, y= SWin_Avg_sum, color = site, linetype = "SWin")) +
  geom_line(aes(x = date, y= SWout_Avg_sum, color = site, linetype = "SWout")) +
  ggtitle("SW daily sum") +
  scale_color_manual(values = c("black", "green"))
ggplotly(sw_daily)
swin_daily_cum<- ggplot(all_rad_daily) +
  geom_line(aes(x = date, y= cumSWin, color = site)) +
  ggtitle("SWin cumulative daily sum") +
  scale_color_manual(values = c("black", "green", "blue", "yellow"))
ggplotly(swin_daily_cum)
swin_daily_ratio_filtered <- ggplot(rad_day_filtered) +
  geom_line(aes(x = date, y= SWin_ratio, color = site)) +
  ggtitle("SWin daily ratio (UF/BF)") +
  scale_color_manual(values = c("black", "green"))
ggplotly(swin_daily_ratio_filtered)
swin_ratio_boxplot<- ggplot(rad_day_filtered, aes(x = site, y= SWin_ratio, color = site)) +
  geom_boxplot() +
  ggtitle("SWin_ratio (UF/BF) daily boxplot - filtered") +
  scale_color_manual(values = c("green"))
ggplotly(swin_ratio_boxplot)
## Warning: Removed 218 rows containing non-finite values (stat_boxplot).
swin_daily_boxplot<- ggplot(all_rad_daily, aes(x = site, y= SWin_Avg_sum, color = site)) +
  geom_boxplot() +
  ggtitle("SWin daily boxplot") +
  scale_color_manual(values = c("black", "green"))
ggplotly(swin_daily_boxplot)
# Albedo
albedo_daily<- ggplot(all_rad_daily, aes(x = date, y= SWalbedo_Avg_median, color = site)) +
  geom_line() +
  ggtitle("Albedo daily median (between 1000 and 1400)")+
  scale_color_manual(values = c("black", "green"))
ggplotly(albedo_daily)
albedo_daily_ratio<- ggplot(all_rad_daily, aes(x = date, y= SWalbedo_ratio, color = site)) +
  geom_line() +
  ggtitle("Albedo daily ratio (UF/BF)")+
  scale_color_manual(values = c("black", "green"))
ggplotly(albedo_daily_ratio)
albedo_daily_boxplot<- ggplot(all_rad_daily, aes(x = site, y= SWalbedo_Avg_median, color = site)) +
  geom_boxplot() +
  ggtitle("Albedo daily boxplot")+
  scale_color_manual(values = c("black", "green"))
ggplotly(albedo_daily_boxplot)
## Warning: Removed 18 rows containing non-finite values (stat_boxplot).
albedo_ratio_boxplot<- ggplot(all_rad_daily, aes(x = site, y= SWalbedo_ratio, color = site)) +
  geom_boxplot() +
  ggtitle("Albedo ratio (UF/BF) boxplot")+
  scale_color_manual(values = c("black", "green"))
ggplotly(albedo_ratio_boxplot)
## Warning: Removed 193 rows containing non-finite values (stat_boxplot).
# longwave
sb = 5.67E-8

all_rad <- all_rad %>%
  mutate(lw_out_temp = sb*(AirTC_Avg+273.15)^4, diff = LWout_Avg - lw_out_temp)

lw_hr <- ggplot(all_rad) +
  geom_line(aes(x = TIMESTAMP, y = LWout_Avg, color = site, linetype = "measured")) +
  geom_line(aes(x = TIMESTAMP, y = lw_out_temp, color = site, linetype = "approx."))
ggplotly(lw_hr)
net_hr <- ggplot(all_rad)